Skip to content

fix: harden frailbox logger error fallback handling - #29

Open
gelo244gum-stack wants to merge 6 commits into
GautamKumarOffical:mainfrom
gelo244gum-stack:patch-1
Open

fix: harden frailbox logger error fallback handling#29
gelo244gum-stack wants to merge 6 commits into
GautamKumarOffical:mainfrom
gelo244gum-stack:patch-1

Conversation

@gelo244gum-stack

Copy link
Copy Markdown

Closes #20.

Summary

Improves the legacy frailbox logger fallback path so file-open and file-write failures preserve log output on stderr instead of silently losing messages.

Changes

  • Added explicit stderr fallback state for failed LOG_FILE opens.
  • Added write/flush failure handling that reports the failing operation, path, errno text, and likely cause before replaying the current log line to stderr.
  • Added shutdown flush/close diagnostics for file operation failures.
  • Made log_dump_ring_buffer return -1 when its descriptor write fails.
  • Added frailbox/tests/test_logger_errors.c covering missing-path open fallback and /dev/full write fallback.
  • Added make logger-error-test for the focused harness.
  • Documented the logger fallback behavior and harness command in docs/OPERATIONS.md.

Testing

  • cd frailbox && make logger-error-test
    • Not completed in this sandbox because gcc and make are not available.
  • python3 build.py
    • Generated diagnostic/build-fa564fee.logd.
    • Generated diagnostic/build-fa564fee.json.
    • The build runner reported missing local toolchains in this environment (cargo, npm, go, gcc, g++, cmake, make, javac, ruby, luac, ghc), so module builds did not complete here.

Checklist

  • Relevant modules affected by these changes build locally
  • Tests pass locally
  • Diagnostic build log is committed in this PR
  • Documentation has been updated, if applicable
  • Configuration or schema changes are documented, if applicable
  • No generated build artifacts are committed, except the required diagnostic build log
  • Changes are scoped to the PR purpose and avoid unrelated cleanup
  • Security, privacy, and error-handling implications have been considered

  • I would like to request that my diagnostic build log is removed before merging

Adds explicit stderr fallback handling for log file open and write failures.
Adds make logger-error-test for the focused logger fallback harness.
Covers missing-path open fallback and /dev/full write fallback behavior.
Documents stderr fallback semantics and the logger-error-test command.
Adds diagnostic JSON metadata generated with python3 build.py.
Adds the generated diagnostic log for the logger fallback bounty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

$5 BOUNTY: [C] Improve frailbox logger error handling

1 participant